#!/usr/bin/env python
# -*- coding:utf-8 -*-

"""
@author zyx
@since 2022/2/18 17:14
@file: c04_selenium_前进和后退.py
"""
# 模拟浏览器的前进后退
from selenium import webdriver
import time

browser = webdriver.Chrome(executable_path=r'D:\Coding\chromedriver\chromedriver.exe')
browser.get('https://www.baidu.com')
browser.get('https://www.taobao.com')

browser.back()
time.sleep(2)
browser.forward()
time.sleep(2)

browser.close()
